package xyz.xtt.schedule.exception;


import xyz.xtt.schedule.constants.ErrorMessage;

/**
 * 通通链操作异常类
 */
public class ChainException extends RuntimeException {
	private static final long serialVersionUID = 1L;
	private int code;
	private String msg;

	public ChainException(ErrorMessage errorMessage) {
		super(errorMessage.getMessage());
		this.code = errorMessage.getCode();
		this.msg = errorMessage.getMessage();
	}
	public ChainException(int code, String msg) {
		super(msg);
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}

}
